const express = require('express');
const aiAssistantController = require('../controllers/aiAssistantController');
const { protect } = require('../middlewares/authMiddleware');

const router = express.Router();

// 所有路由都需要登录
router.use(protect);

// AI助手初始化和设置
router.post('/initialize', aiAssistantController.initializeAssistant);
router.get('/', aiAssistantController.getAssistant);
router.patch('/', aiAssistantController.updateAssistant);

// AI助手交互
router.post('/interact', aiAssistantController.interactWithAssistant);
router.post('/feedback', aiAssistantController.provideAssistantFeedback);
router.get('/history', aiAssistantController.getInteractionHistory);

// 学习档案
router.patch('/learning-profile', aiAssistantController.updateLearningProfile);

module.exports = router;